Skip to content

refactor: drop sigstore-protobuf-specs dependency #132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

woodruffw
Copy link
Contributor

I come bearing gifts 🙂

This is a work in progress; it shouldn't be merged until sigstore/sigstore-python#1470 lands in a release.

Key changes:

  • sigstore-protobuf-specs is entirely gone.
  • I've refactored the tests to use the public OIDC beacon, and made some corresponding tweaks to the CI to use the beacon by default. This allows tests to run with 100% coverage, even on third-party PRs (like this one).

Closes #131.

@woodruffw
Copy link
Contributor Author

Huh, no idea why this is failing in CI but not locally for me:

    @classmethod
    def from_json(cls, json: str | bytes) -> te.Self:
>       return cls.model_validate_json(json)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       pydantic_core._pydantic_core.ValidationError: 1 validation error for TrustedRoot
E       timestampAuthorities
E         Field required [type=missing, input_value={'mediaType': 'applicatio...rjePK3/h4pygC8p7o4='}}]}, input_type=dict]
E           For further information visit https://errors.pydantic.dev/2.11/v/missing

env/lib/python3.13/site-packages/sigstore_models/_core.py:22: ValidationError
------------------------------ Captured log call -------------------------------
DEBUG    pypi_attestations._cli:_cli.py:620 Namespace(verbose=0, subcommand='verify', verification_type='attestation', identity='https://github.com/trailofbits/pypi-attestations/.github/workflows/release.yml@refs/tags/v0.0.19', staging=False, offline=True, files=[PosixPath('/home/runner/work/pypi-attestations/pypi-attestations/test/assets/pypi_attestations-0.0.19.tar.gz')])
DEBUG    sigstore._internal.tuf:tuf.py:95 TUF metadata: /home/runner/.local/share/sigstore-python/tuf/https%3A%2F%2Ftuf-repo-cdn.sigstore.dev
DEBUG    sigstore._internal.tuf:tuf.py:96 TUF targets cache: /home/runner/.cache/sigstore-python/tuf/https%3A%2F%2Ftuf-repo-cdn.sigstore.dev
WARNING  sigstore._internal.tuf:tuf.py:100 TUF repository is loaded in offline mode; updates will not be performed
DEBUG    sigstore._internal.tuf:tuf.py:130 Using unverified trusted root from cache
=============================== warnings summary ===============================

Either way this is an overly strict check in sigstore-models, so I'll fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drop sigstore_protobuf_specs
1 participant